﻿@{
    ViewBag.Title = "JsTest";
    Layout = "~/Views/Shared/_AmazeLayout.cshtml";
}
<div class="am-cf am-padding am-padding-bottom-0">
    <div class="am-fl am-cf">
        <strong class="am-text-primary am-text-lg">JavaScript实验</strong> /
        <small>JavaScript</small>
    </div>
</div>
<hr>
<div class="am-g">
    <div class="am-u-sm-12">

        <p id="demo1">我的段落</p>
        <p id="demo2"></p>
        <p id="demo3"></p>
        <button type="button" onclick="myFunction()">点击查看时间</button>
        <button onclick="myfunction()">点击查看时间</button>
        <button onclick="this.innerHTML=Date()">现在的时间是?</button>
        <button onclick="myFunction1()">点击这里</button>
        <p id="demo4"></p>
        
        <script>
         //   window.alert("JaveScript实验");
            document.getElementById("demo1").innerHTML = 123e5;
            document.getElementById("demo2").innerHTML = 'John Doe';
            document.getElementById("demo3").inerhtml = "段落已修改";
            function myFunction()
            {
                //   document.write(Date());
                document.getElementById("demo3").innerHTML = Date();
            }
            function myfunction(name, job) {
                alert((Date()));
            }
            function myFunction1() {
                var x = "";
                for (var i = 0; i < 5; i++) {
                    x = x + " 该数字为 " + i + "<br>";
                }
                document.getElementById("demo4").innerHTML = x;
            }
        </script>

    </div>
</div>
